<%@ page import="com.webamc.common.enums.Fields" %>
<%@ page import="com.webamc.common.enums.Params" %>
<%@ page import="com.webamc.model.Order" %>
<%@ page import="com.webamc.util.CommonUtil" %>

<script type="text/javascript" src="../calendar.js" ></script>
<%
    Order order = (Order) request.getAttribute(Params.BEAN);
    if (order == null) {
%><p class="header-divsmall">No order, <a href="order.html?action=browse">click here</a> to browse list.</p>
<%
        return;
    }
%>

<tr>
    <td>OrderId</td>
    <td>
        <input readonly="readonly" name="<%=Fields.ORDERID%>" value="<%=order.getOrderId()%>"/>
    </td>
</tr>
<tr>
    <td>Customer Id</td>
    <td>
        <input readonly="readonly" name="<%=Fields.CUSTOMERID%>" value="<%=order.getCustomerId()%>"/>
        <a href="javascript:showMe('customer.html?action=browse')"><%=Params.LIST%>
        </a>
    </td>
</tr>
<tr>
    <td>Product Name</td>
    <td>
        <input name="<%=Fields.PRODUCTNAME%>" readonly="readonly" value="<%=order.getProductName()%>"/>
        <a href="javascript:showMe('product.html?action=browse','<%=Fields.PRODUCTID%>')"><%=Params.LIST%>
        </a>
    </td>
</tr>
<tr>
    <td>Product Serial</td>
    <td>
        <input name="<%=Fields.PRODUCTSERIAL%>" value="<%=CommonUtil.out(order.getProductSerial())%>"/>
    </td>
</tr>
<tr>
    <td>Order Status</td>
    <td>
        <% request.setAttribute(Params.KEY, Fields.ORDERSTATUS); %>
        <% request.setAttribute(Params.SEL, order.getStatus()); %>
        <jsp:include page="combo-util.jsp" />
    </td>
</tr>
<tr>
    <td>Description</td>
    <td>
        <textarea rows="2" cols="20" name="<%=Fields.DESCRIPTION%>"><%=CommonUtil.out(order.getDescription())%></textarea>
    </td>
</tr>
<tr>
    <td>Remarks</td>
    <td>
        <textarea rows="2" cols="20" name="<%=Fields.REMARKS%>"><%=CommonUtil.out(order.getRemarks())%></textarea>
    </td>
</tr>
